<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .active {
           width: 200px;
           height: 200px;
           background-color: blue;
        }
        .click {
            width: 400px;
            height: 400px;
            background-color: pink;
        }
    </style>
</head>
<body>
    <div class="active">

    </div>
    <script>
        const div = document.querySelector('div');
        div.addEventListener('click',()=>{
            div.className = 'click';
        });
    </script>

</body>
</html>